﻿using OestsCommon.Model;

namespace OestsServer.Managers
{
    /// <summary>
    /// 教员管理类，处理一些非向Teacher直接请求，但是Teacher需要处理的消息
    /// </summary>
    public class TeacherManager
    {
        #region 单列
        private static TeacherManager _instance;
        public static TeacherManager Instance
        {
            get
            {
                if (_instance == null)
                    _instance = new TeacherManager();
                return _instance;
            }
        }

        public TeacherManager()
        {
            _instance = this;
        }
        #endregion

        /// <summary>
        /// 通知教员学员的在线情况
        /// </summary>
        /// <param name="st"></param>
        public void NotifyTeacherStOnlineState(Student st)
        {
            //获取管理教员id
            //int teacherId = st.TeacherId;
            //ClientChannel client = MSClientManager.GetClient(UserType.Teacher, st.TeacherId);
            //if(client!=null)
            //{
            //    Response p = new Response
            //    {
            //        ResponseCode = PacketKey.TeacherUser,
            //        ResponseSubCode = SubCode.StudentOnline,
            //        DataObject = st
            //    };
            //    client.Send(p);
            //}
        }
    }
}

